<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@include file="/include/public.jspf"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-base.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-common.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/p-all.css" />

<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js"></script>
<script type="text/javascript" src="${path }/js/morepaging-borrow.js"></script><!-- 分页数据拼接 -->
<script type="text/javascript" src="${path }/js/helper.js"></script>
<script type="text/javascript" src="${path }/js/common/base.js"></script>

<title>魔环金融</title>
</head>
<body>
<div class="ui_title">
        <a class="ui_back" href="${path }/member/center.htm"><i class="ui_icon_back"></i>返回</a>
        持有资产</div>
    <section class="m-main p_load">
        <div class="ui_acc_money">
            <div class="money-list clearfix">
                <div class="money-l">
                    <div class="mo-tit">总投资额(元)</div>
                    <div class="mo-cont"> <fmt:formatNumber value="${account.totalInvestMoney/100}" type="currency" pattern="0.00" /> </div>
                </div>
                <div class="money-r">
                    <div class="mo-tit">累计收益(元)</div>
                    <div class="mo-cont"> <fmt:formatNumber value="${account.totalIncomeMoney/100 }" pattern="0.00"></fmt:formatNumber> </div>
                </div>
            </div>
            <div class="money-list clearfix">
                <div class="money-l">
                    <div class="mo-tit">待收收益(元)</div>
                    <div class="mo-cont"><fmt:formatNumber value="${account.inComeMoneyCollect/100 }" pattern="0.00"></fmt:formatNumber></div>
                </div>
                <div class="money-r">
                    <div class="mo-tit">待收本金(元)</div>
                    <div class="mo-cont"><fmt:formatNumber value="${account.baseMoneyCollect/100 }" pattern="0.00"></fmt:formatNumber></div>
                </div>
            </div>
        </div>
        <div class="tab">
            <ul class="ui_tab_nav ui_tab_num4 mt10">
                <li <c:if test="${empty status }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm">全部</a></span><em></em></li>
                <li <c:if test="${status eq 'SUCESS' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=SUCESS">投资中</a></span><em></em></li>
                <li <c:if test="${status eq 'LOANING' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=LOANING">还款中</a></span><em></em></li>
                <li <c:if test="${status eq 'RETURNED' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=RETURNED">已还清</a></span><em></em></li>
<%--                 <li <c:if test="${empty status }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm">全部</a></span><em></em></li>
                <li <c:if test="${status eq 'SUCESS' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=SUCESS">投资中</a></span><em></em></li>
                <li <c:if test="${status eq 'LOANING' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=LOANING">还款中</a></span><em></em></li>
                <li <c:if test="${status eq 'LOANED' }">class="select"</c:if>><span><a href="${path }/investInfo/allInvest.htm?status=LOANED">已还清</a></span><em></em></li> --%>
            </ul>
            <div class="tab_bd">
                <!-- 全部 -->
                <div class="tab_con">
                    <div class="tab_box">
                    	<div class="load_list" id="list_more"></div>
                    </div>
                    <div class="ui_loadmore_text"><a href="javascript:void(0);" class="more">点击加载更多</a></div>
                </div>
            </div>
        </div>
    </section>
    
    <script>
  //加载更多--分页
	    	var status = "${status}";
	    	var isLogin = ${isLogin};
	    	if(!isLogin){
	    		window.location.href="${path }/user/login/index.jsp";
	    	}
	        // 加载更多事件绑定
	        var page = 2;
	        /* $('.more').click(function() {
	            
	        }); */
	        $(document).on('click','.more',function(){
	        	reqData(page, '#list_more');
	            page++;
	        }); 
	     	// ajax请求
			function reqData(page, pageSelector) {
				$('.ui_loadmore_text').html('<div class="ui_loading"><div class="bar1"></div><div class="bar2"></div><div class="bar3"></div><div class="bar4"></div><div class="bar5"></div><div class="bar6"></div><div class="bar7"></div><div class="bar8"></div><div class="bar9"></div><div class="bar10"></div><div class="bar11"></div><div class="bar12"></div></div>&nbsp;&nbsp;正在加载');
				$.ajax({
					url : '${path }/investInfo/getInvestList.htm',
					type : 'post',
					data : {
						status : status,
						curPage : page,
					},
					success : function(data) {
						data = $.parseJSON(data);
						addHtml(data);
						if (data.pageCount[0] <= 0) {
							$(pageSelector).hide();
							return;
						} else {
							$(pageSelector).show();
						}
					},
					error : function() {
					}
				})
			}
			// 初始数据
	        reqData(1,'#list_more');
    </script>
</body>
</html>